package tetris.features;

import java.util.ArrayList;

import tetris.simulator.State;

public class ColHeightDiffFeature extends Feature{
  
  public ArrayList<Double> getFeatureVector(State tetrisState) {
    ArrayList<Double> featureVector = new ArrayList<Double>();
    ColHeightFeature heightFeature = new ColHeightFeature();
    ArrayList<Double> heights = heightFeature.getFeatureVector(tetrisState);
    for (int i = 1; i < heights.size(); i++)
      featureVector.add(new Double(heights.get(i) - heights.get(i-1)));
    return featureVector;
  }
}
